1 <?php
2 session_start();
3 include(
"header.php");
4 include(
"sidebar.php");
5 include(
"dbconnection.php");
6
7 if
(isset($_SESSION[empid]))
8 {
9     header(
"Location: empaccount.php");
10 }

11 if
(isset($_SESSION[custid]))
12 {
13     header(
"Location: account.php");
14 }
15
16     
if(isset($_POST[submit]))
17         {
18             mysql_query(
"UPDATE customer SET password='$_POST[password]' where emailid='$_POST[emailid]'");
19             
if(mysql_affected_rows() == 1)
20             {
21                 $respass =
"Password updated successfully...";
22             }
23         }
24 ?>
25         
26                             
27         <div id=
"main">
28             
29             <a name=
"TemplateInfo"></a>
30             <h1>Forgot password</h1>
31             <p><strong>Please enter New Password and confirmation password to reset password </strong></p>
32           <form id=
"form1" name="form1" method="post" action="" onsubmit="return validate()">
33           <table width=
"521" height="208" border="0">
34           <?php
35             
if(isset($_POST[submit]))
36           {
37           ?>
38             <tr>
39               <th colspan=
"2" scope="row"><font color="#FF0000"><b><?php echo $respass; ?></b></font></th>
40             </tr>
41             <?php
42           }
43           
else
44           {
45             ?>
46             <tr>
47               <th width=
"155" height="39" scope="row">Email ID</th>
48               <td width=
"301"><input name="emailid" type="text" id="emailid" value="<?php echo $_GET[emailid] ; ?>" size="50" readonly="readonly" /></td>
49             </tr>
50             <tr>
51               <th height=
"39" scope="row">New Password</th>
52               <td><input name=
"password" type="password" id="password" size="50" /></td>
53             </tr>
54             <tr>
55               <th height=
"49" scope="row">Confirm password</th>
56               <td><input name=
"cpassword" type="password" id="cpassword" size="50" /></td>
57             </tr>
58             <tr>
59               <th scope=
"row">&nbsp;</th>
60               <td><input name=
"submit" type="submit" class="button" id="submit" value="Recover password" /></td>
61             </tr>
62             <?php
63           }
64             ?>
65             <tr>
66               <th scope=
"row">&nbsp;</th>
67               <td>&nbsp;</td>
68             </tr>
69             </table>
70 </form>
71             <p>&nbsp;</p>
72             <p>&nbsp;</p>
73             <p>&nbsp;</p>
74             <p>&nbsp;</p>
75             <p>&nbsp;</p>
76             <p>&nbsp;</p>
77         </div>
78         
79 <!-- wrap ends here -->
80 </div>
81         
82 <?php
83 include(
"footer.php");
84 ?>


Gõ tìm kiếm nhanh...